GFA TIP01: By John B. Holder Senior Software Engineer Marathon Computer Press This short file will show you the two ways to tell if the printer connected to your system is ready to receive data or not. The first method, { The way discussed in the GFA Basic Manual} uses the OUT? command, and the second way utilizes the low level GEMDOS c_prnos System call. So without further ado let's take a look at the two methods and what they do for you. Using the OUT? Command: By using the following code snip you can determine if your printer is hooked up and ready to receive data. Out 0,0 If Out?(0) Ok=1 Else Ok=-1 Endif If Ok=-1 Alert 1," Printer is not on! ",1," OK ",reply% Else Alert 1," Everything's O.K. ",1," OK ",reply% Endif end Positive points: This method will work not only with the printer port, but also with the AUX (1) port and the MID (3) port. To check those ports just use Out?(1) or Out?(3). Bad Point: If the printer is not connected, you will have to wait for 30 seconds for the control of the console to be returned to the application. It is for this reason that this method may not be the one of choice for most applications. The c_prnos Substitute call: Try this procedure out: Procedure C_prnos Status%=Gemdos(&H11) Return If your printer is connected to the system and ready to receive data, the value assigned to the Status% variable will be a negative 1 (-1). If the printer isn't ready, you'll find a zero (0) in the variable upon return. Positive Point: This call only takes an instant to register an answer, instead of the 30 seconds recorded above if there is a problem. Weak Point: This call will function with only the printer port, and not MID port. I hope this small doc file has helped some of you. I will try to address questions in this manner in Future GFATIPxx.DOC files. Please U/L your own tip files to the MichTron Libraries if so desired. I ask that you use some other naming convention besides the GFATIPxx.DOC one though so there will not be any confusion.